package com.eduhzy.ttw.clazz.mvp.contract;

import android.app.Activity;

import com.eduhzy.ttw.clazz.mvp.model.entity.ReviewStudentData;
import com.eduhzy.ttw.clazz.mvp.model.entity.ClazzScoreData;
import com.eduhzy.ttw.commonsdk.entity.CommonData;
import com.jess.arms.mvp.IModel;
import com.jess.arms.mvp.IView;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;

/**
 * @author xubo
 * @date 2018-12-4 11:15:26
 */
public interface ClazzReviewContract {
    //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
    interface View extends IView {
        Activity getActivity();

        void updateDialog(List<ClazzScoreData> data);

        void showDialogLoading(boolean show);
    }

    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
    interface Model extends IModel {

        Observable<CommonData<List<ReviewStudentData>>>  getStudentList(Map<String,Object> map);

        Observable<CommonData<List<ClazzScoreData>>>  getEvaluateTagList(Map<String,Object> map);

        Observable<CommonData<Map>>  scoreSave(Map<String,Object> map);
    }
}
